﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="sign_up.aspx.cs" Inherits="sign_up"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style5
        {
            width: 70%;
        }
        .style6
        {
            width: 152px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
        <span class="title1">Welcome to Citiport!<br />
        </span><span class="title2">Sign up for your account</span></p>
    <p>
        <asp:Label ID="Label1" runat="server" ForeColor="Red" 
            Text="This e-mail has already been used,please try again" Visible="False"></asp:Label>
</p>
    <table class="style5">
        <tr>
            <td class="style6">
    Email</td>
            <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="x" 
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="TextBox1" ErrorMessage="?"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6">
    Confirm your emaill</td>
            <td>
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ControlToValidate="TextBox2" ErrorMessage="?"></asp:RequiredFieldValidator>
        <asp:CompareValidator ID="CompareValidator1" runat="server" 
            ControlToCompare="TextBox1" ControlToValidate="TextBox2" 
            ErrorMessage="your e-mail do not match"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="style6">
    Password</td>
            <td>
                <asp:TextBox ID="TextBox3" runat="server" TextMode="Password"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
        ControlToValidate="TextBox3" ErrorMessage="?"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style6">
    Confirm your password</td>
            <td>
                <asp:TextBox ID="TextBox4" runat="server" 
        TextMode="Password"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
        ControlToValidate="TextBox4" ErrorMessage="?"></asp:RequiredFieldValidator>
    <asp:CompareValidator ID="CompareValidator2" runat="server" 
        ControlToCompare="TextBox3" ControlToValidate="TextBox4" 
        ErrorMessage="your password do not match"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td class="style6" valign="top">
                Languages you can accept</td>
            <td>
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" 
            DataSourceID="LinqDataSource1" DataTextField="title" DataValueField="no" 
            RepeatColumns="3" RepeatDirection="Horizontal">
        </asp:CheckBoxList>
            </td>
        </tr>
    </table>
<p>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="OK" />
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="ctpDataContext" TableName="languages" 
        Where="language_no == @language_no">
            <WhereParameters>
                <asp:SessionParameter Name="language_no" SessionField="now_user_lang_no" 
                    Type="Int32" />
            </WhereParameters>
        </asp:LinqDataSource>
</p>
</asp:Content>

